<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>登陆框架</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gbk">
    <link rel="stylesheet" type="text/css" href="ext-3.2.0/resources/css/ext-all.css" />
    <script type="text/javascript" src="ext-3.2.0/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="ext-3.2.0/ext-all-debug.js"></script>
    <script type="text/javascript" src="localXHR.js"></script>
<script type="text/javascript">
Ext.onReady
( function()
{ Ext.QuickTips.init();
  var config = { title:'聊天登陆',
                  labelSeparator:':',
				  labelWidth:60,
				  labelAlign:'right',
				  bodyStyle:'padding:5 5 5 5',
				  frame:true,
				  height:'auto',
				  width:300,
				  renderTo:'form',
				  url:'',
				  items:[ new Ext.form.TextField({ fieldLabel:'用户名',
												    id:'username',
													selectOnFocus:true,
													allowBlank:false,
													blankText:'用户名不可为空',
													regex:/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}(A-Za-z}){2,4}$/,
													regexText:'用户格式错误',
													emptyText:"请输入用户名"
                                                 }),
						 new Ext.form.TextField({  fieldLabel:'密码',
												    inputType:'password',
													allowblank:'false',
													maxLength:12,
													maxLengthText:'最大长度不能超过12位!',
													minLength:4,
													minlengthText:'最小长度不能低于4位!',
													blankText:'密码不能为空'
												})
						 ],
				  buttons:[ new Ext.Button({ text:'登陆',
											   handler:function()
											   { form.getForm().submit();}
											}),
						   new Ext.Button({ text:'重置',
										     handler:function()
											 { form.form.reset();}
										  })
						   ]
                 }
	 var form = new Ext.form.FormPanel(config);
});
</script>
</head>

<body>
<div id="form"></div>
</body>
</html>
